<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="description" content="Metro, a sleek, intuitive, and powerful framework for faster and easier web development for Windows Metro Style.">
    <meta name="keywords" content="HTML, CSS, JS, JavaScript, framework, metro, front-end, frontend, web development">
    <meta name="author" content="Sergey Pimenov and Metro UI CSS contributors">

    <link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
    <title>Dialog :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style</title>

    <link href="css/metro.css" rel="stylesheet">
    <link href="css/metro-icons.css" rel="stylesheet">
    <link href="css/metro-responsive.css" rel="stylesheet">
    <link href="css/metro-schemes.css" rel="stylesheet">

    <link href="css/docs.css" rel="stylesheet">

    <script src="js/jquery-2.1.3.min.js"></script>
    <script src="js/metro.js"></script>
    <script src="js/docs.js"></script>
    <script src="js/prettify/run_prettify.js"></script>
    <script src="js/ga.js"></script>
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>


    <script>
        function showDialog(id){
            var dialog = $("#"+id).data('dialog');
            if (!dialog.element.data('opened')) {
                dialog.open();
            } else {
                dialog.close();
            }
        }
    </script>

</head>
<body>
    <div class="container page-content">
        <h1><a href="index.html" class="nav-button transform"><span></span></a>&nbsp;Dialog</h1>

        @@adsense

        <div class="margin20 no-margin-left no-margin-right sub-header text-light">
            Metro UI CSS provides the ability to easily create dialogs. The dialogue can be ANY Your unit, it is sufficient to determine the appropriate role <span class="tag">data-role='dialog'</span>.
        </div>

        <div class="padding20 no-padding-right no-padding-left no-padding-top">
            <button class="button" onclick="showDialog('dialog')">Show dialog</button>
            <button class="button" onclick="showDialog('dialog2')">Show dialog2</button>
            <button class="button success" onclick="showDialog('dialog3')">Success</button>
            <button class="button warning" onclick="showDialog('dialog4')">Warning</button>
            <button class="button alert" onclick="showDialog('dialog5')">Alert</button>
            <button class="button info" onclick="showDialog('dialog6')">Info</button>
            <button class="button" onclick="showDialog('dialog10')">Custom colors</button>
            <button class="button" onclick="showDialog('dialog7')">Windows Style</button>
            <button class="button" onclick="showDialog('dialog8')">Overlay</button>
            <button class="button" onclick="showDialog('dialog9')">Overlay 2</button>
        </div>

        <div class="example" data-text="code">
            <pre class="prettyprint linenums"><code>
                &lt;div data-role="dialog"&gt;
                    ...you content here...
                &lt;/div&gt;
            </code></pre>
        </div>

        <div class="example" data-text="example">
            <h5>Example of usage</h5>
            <pre class="prettyprint linenums"><code>
                &lt;button onclick="showDialog('#dialog')"&gt;Show dialog&lt;/button&gt;

                &lt;div data-role="dialog" id="dialog"&gt;
                    &lt;h1&gt;Simple dialog&lt;/h1&gt;
                    &lt;p&gt;
                        Dialog :: Metro UI CSS - The front-end framework
                        for developing projects on the web in Windows Metro Style.
                    &lt;/p&gt;
                &lt;/div&gt;

                &lt;script&gt;
                    function showDialog(id){
                        var dialog = $(id).data('dialog');
                        dialog.open();
                    }
                &lt;/script&gt;
            </code></pre>
        </div>

        <div data-role="dialog" id="dialog" class="padding20" data-close-button="true">
            <h1>Simple dialog</h1>
            <p>
                Dialog :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style
            </p>
        </div>

        <div data-role="dialog" id="dialog3" class="padding20" data-close-button="true" data-type="success">
            <h1>Simple dialog</h1>
            <p>
                Dialog :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style
            </p>
        </div>

        <div data-role="dialog" id="dialog4" class="padding20" data-close-button="true" data-type="warning">
            <h1>Simple dialog</h1>
            <p>
                Dialog :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style
            </p>
        </div>

        <div data-role="dialog" id="dialog5" class="padding20" data-close-button="true" data-type="alert">
            <h1>Simple dialog</h1>
            <p>
                Dialog :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style
            </p>
        </div>

        <div data-role="dialog" id="dialog6" class="padding20" data-close-button="true" data-type="info">
            <h1>Simple dialog</h1>
            <p>
                Dialog :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style
            </p>
        </div>

        <div data-role="dialog" id="dialog7" class="padding20" data-close-button="true" data-windows-style="true">
            <div class="container">
                <h1>Simple dialog</h1>
                <p>
                    Dialog :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style
                </p>
            </div>
        </div>

        <div data-role="dialog" id="dialog8" class="info padding20" data-close-button="true" data-overlay="true">
            <h1>Simple dialog</h1>
            <p>
                This dialog with default overlay
            </p>
        </div>

        <div data-role="dialog" id="dialog9" class="padding20" data-close-button="true" data-overlay="true" data-overlay-color="op-dark" data-overlay-click-close="true">
            <h1>Simple dialog</h1>
            <p>
                This dialog with colored overlay
            </p>
        </div>

        <div data-role="dialog" id="dialog10" class="padding20" data-close-button="true" data-background="bg-pink" data-color="fg-white">
            <h1>Simple dialog</h1>
            <p>
                This dialog with custom colors
            </p>
        </div>

        <div data-role="dialog" id="dialog2" data-hide="3000" class="padding20" data-close-button="true">
            <h1>Simple dialog</h1>
            <p>
                This dialog will be auto closed after 3 sec
            </p>
        </div>

        <h3>Options</h3>
        <table class="table bordered border">
            <thead>
            <tr>
                <td>Parameter</td>
                <td>Data-*</td>
                <td>Type</td>
                <td>Default value</td>
                <td>Description</td>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>overlay</td>
                <td style="white-space: nowrap">data-overlay</td>
                <td>boolean</td>
                <td>false</td>
                <td>Show dialog with overlay</td>
            </tr>
            <tr>
                <td>overlayClickClose</td>
                <td style="white-space: nowrap">data-overlay-click-close</td>
                <td>boolean</td>
                <td>false</td>
                <td>Close dialog on overlay click</td>
            </tr>
            <tr>
                <td>overlayColor</td>
                <td style="white-space: nowrap">data-overlay-color</td>
                <td>string</td>
                <td>default</td>
                <td>Overlay color, hex value or class name</td>
            </tr>
            <tr>
                <td>type</td>
                <td style="white-space: nowrap">data-type</td>
                <td>string</td>
                <td>default</td>
                <td>Dialog type: default, success, warning, alert, info</td>
            </tr>
            <tr>
                <td>background</td>
                <td style="white-space: nowrap">data-background</td>
                <td>string</td>
                <td>default</td>
                <td>Dialog background color, hex value or class name</td>
            </tr>
            <tr>
                <td>color</td>
                <td style="white-space: nowrap">data-color</td>
                <td>string</td>
                <td>default</td>
                <td>Dialog main color for text, hex value or class name</td>
            </tr>
            <tr>
                <td>hide</td>
                <td style="white-space: nowrap">data-hide</td>
                <td>int</td>
                <td>false</td>
                <td>If value gt 0 then dialog hide automatically after N ms</td>
            </tr>
            <tr>
                <td>width</td>
                <td style="white-space: nowrap">data-width</td>
                <td>int or string</td>
                <td>auto</td>
                <td>Dialog width</td>
            </tr>
            <tr>
                <td>height</td>
                <td style="white-space: nowrap">data-height</td>
                <td>int or string</td>
                <td>auto</td>
                <td>Dialog height</td>
            </tr>
            <tr>
                <td>show</td>
                <td style="white-space: nowrap">data-show</td>
                <td>boolean</td>
                <td>false</td>
                <td>Auto open Dialog after create</td>
            </tr>
            <tr>
                <td>closeButton</td>
                <td style="white-space: nowrap">data-close-button</td>
                <td>boolean</td>
                <td>false</td>
                <td>Show dialog close button</td>
            </tr>
            <tr>
                <td>windowsStyle</td>
                <td style="white-space: nowrap">data-windows-style</td>
                <td>boolean</td>
                <td>false</td>
                <td>Show dialog in windows 8 style (full width). Recommended put content in additional <span class="tag">div</span> with class <span class="tag">.container</span></td>
            </tr>
            </tbody>
        </table>
    </div>

    @@hit

</body>
</html>